﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Program
    {
        
        static void Main(string[] args)
        {
            
            Hashtable hashtable = new Hashtable();
           
            hashtable.Add(1, "YYY");
            hashtable.Add(2, "XXX");
          

            int math = Console.Read();
            
            switch (math)
            {
                case 1: Console.WriteLine("YYY");
                    break;
                case 2: Console.WriteLine("XXX");
                    break;
            }

            foreach (DictionaryEntry d in hashtable)
            {
                int key = (int)d.Key;
                string value = d.Value.ToString();
                Console.WriteLine("编号：{0}，名称：{1}", key, value);
            }


        }
    }
}
